<extend name="Public/frame" />
<block name="content-box">

<form class="form-horizontal tpx-ajaxsubmit" role="form" action="{:U('Administrator/userhandle?action=edit&id='.$data_id)}" method="post">

    <div class="form-group">
        <label class="col-sm-2 control-label">{$Think.lang.username}</label>
        <div class="col-sm-10">
            <input name="username" type="text" class="form-control" placeholder="" required="required" value="{$data_username|htmlspecialchars}" style="width:auto;" />
            <div class="help-block"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">{$Think.lang.password}</label>
        <div class="col-sm-10">
            <input name="password" type="text" class="form-control" placeholder="{$Think.lang.empty_means_no_change}" value="{$data_password|htmlspecialchars}" style="width:auto;" />
            <div class="help-block"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">{$Think.lang.status}</label>
        <div class="col-sm-10">
            <label class="radio-inline">
                <input type="radio" name="status" value="1"<if condition="$data_status eq 1"> checked="checked"</if>> {$Think.lang.status_normal}
            </label>
            <label class="radio-inline">
                <input type="radio" name="status" value="0"<if condition="$data_status eq 0"> checked="checked"</if>> {$Think.lang.status_forbidden}
            </label>
            <div class="help-block"></div>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">{$Think.lang.role}</label>
        <div class="col-sm-10">

            <foreach name="data_rolelist" item="r" key="k" >
                <div>
                    <label class="checkbox-inline">
                        <if condition="in_array($r['id'],$data_roleids)">
                            <input type="checkbox" class="checkbox-parent" checked="checked" name="roleids[]" id="roleids-{$r.id}" value="{$r.id}" />
                        <else />
                            <input type="checkbox" class="checkbox-parent" name="roleids[]" id="roleids-{$r.id}" value="{$r.id}" />
                        </if>
                        {$r.name}
                    </label>
                </div>
            </foreach>
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary">{$Think.lang.submit}</button>
            <button type="button" class="btn btn-default" onclick="window.history.go(-1);">{$Think.lang.back}</button>
        </div>
    </div>
</form>

</block>